Skip to content

Advanced routing & execution: 5 opt-in features#1

Merged
JasonDD merged 1 commit into
mainfrom
feat/advanced-routing-5
Jun 1, 2026
Merged

Advanced routing & execution: 5 opt-in features#1
JasonDD merged 1 commit into
mainfrom
feat/advanced-routing-5

Conversation

@JasonDD
Copy link
Copy Markdown
Contributor

@JasonDD JasonDD commented Jun 1, 2026

Implements 5 of the roadmap's clean-win features, all off by default:

  • Predictive SLA routing (#7) — rolling p95 latency per backend; rule max_ttft_ms drops over-budget backends (never empties candidates).
  • Spot-market arbitrage (#14) — cost_aware_routing prefers cheapest eligible backend; optional price_feed_url keeps costs live.
  • Semantic/fuzzy prompt cache (#4) — embed prompt, return on cosine ≥ min_similarity (0.96); reuses graphify embedder + pgvector; X-Kronaxis-Cache: SEMANTIC.
  • System-2 reflection (#15) — X-Kronaxis-Reflect: 1 self-review pass.
  • Adversarial consensus (#18) — X-Kronaxis-Consensus: 1 fan-out + arbiter.

Each is additive and opt-in; reuses existing infra (embedder/pgvector, parallel dispatch, Jaccard, latency tracking, cost routing). 213 tests pass, race + vet clean. Docs updated (README, CHANGELOG, config.yaml, api-reference).

- Predictive SLA routing: rolling p95 latency window per backend (sla.go),
  rule max_ttft_ms drops over-budget backends (never empties candidates)
- Spot-market arbitrage: cost_aware_routing prefers cheapest eligible backend
  + optional price_feed_url live-cost updater (pricefeed.go)
- Semantic/fuzzy prompt cache: embed prompt, return on cosine >= min_similarity
  (semcache.go, reuses graphify embedder + pgvector); X-Kronaxis-Cache: SEMANTIC
- System-2 reflection: X-Kronaxis-Reflect runs a self-review pass (reflect.go)
- Adversarial consensus: X-Kronaxis-Consensus fans out + arbiter (consensus.go)

All off by default. Tests for SLA window/filter, price-feed parse, EffectiveCost,
header parsing (race-clean). Docs: README, CHANGELOG, config.yaml, api-reference.
@JasonDD JasonDD merged commit 263bc95 into main Jun 1, 2026
@JasonDD JasonDD deleted the feat/advanced-routing-5 branch June 1, 2026 22:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant